package src.edge;

import src.node.Node;

/**
 * Created by IntelliJ IDEA.
 * User: NRG
 * Date: 02.11.12
 * Time: 10:13
 * To change this template use File | Settings | File Templates.
 */
public class Edge {
    private Node src;
    private Node dst;
    private double weight;

    public Edge(Node from, Node to, double newWeight) {
        src = from;
        dst = to;
        weight = newWeight;
    }

    public Node getSrc() {
        return src;
    }

    public Node getDst() {
        return dst;
    }

    public double getWeight() {
        return weight;
    }

    public String toString() {
        return "SRC ID : " + src.getId() + " DST ID : " + dst.getId() + " Edge Weight:" + String.format("%.3f",weight);
    }
}
